package com.surveillance.BO;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.surveillance.DAO.ServiceDao;
import com.surveillance.entities.Servicee;

@Service("ServiceBO")
public class ServiceBO implements BOLayer<Servicee> {
	@Autowired
	private ServiceDao serviceDAO;

	public void setAgendaDAO(ServiceDao serviceDAO) {
		this.serviceDAO = serviceDAO;
	}

	@Override
	public boolean save(Servicee myEntity) {
		serviceDAO.save(myEntity);
		return true;
	}

	@Override
	public void update(Servicee myEntity) {
		serviceDAO.update(myEntity);

	}

	@Override
	public void delete(Servicee myEntity) {
		serviceDAO.delete(myEntity);
	}

	@Override
	public Servicee findByID(Long myEntityID) {
		return serviceDAO.findByID(myEntityID);
	}

	@Override
	public List<Servicee> findAll() {
		return serviceDAO.findAll();
	}
	public Servicee findByNom(String nom){
		return serviceDAO.getServiceByNom(nom);
	}

}
